1. Field of the Invention
The present invention relates to a packet transfer method and apparatus.
2. Description of the Prior Art
A transfer method for the IP traffic that has recently gained attention is an MPLS (Multi Protocol Label Switching) transfer method that has been standardized in the IETF (Internet Engineering Task Force). In the MPLS, the packet is transferred by referring to a numerical value of fixed length called a label for routing the packet between label switching routers.
One of the features of the MPLS is the hierarchy of labels. Namely, the labels are layered, each layer being managed individually, whereby a labeled packet can be tunneled through a network. That is, a packet is encapsulated with a new label while a label value attached before is kept, and the packet is transferred through the network by referring to the label value at the initial position. In this way, a route within the network can be set up independently for each layer.
The layered labels made in the above way can provide a great advantage, but in the encapsulation for appending the label or the decapsulation, a step of inserting or deleting the label into or from the header of packet is required. For this step, however, there is a drawback that a queue buffer is needed, and the insertion or deletion of label may be different for each input label, whereby this step is inappropriate for the router operation for switching with the hardware.
In the MPSL standards, the output processing is determined by referring to the initial position of an input label. The output processings include a label exchange, a label stack deletion (pop), and a label stack addition (push). The label exchange is replacing an output label resulting from the retrieval of an input label with the input label. The label stack deletion is deleting the initial label, but consequently the retrieval must be made again, employing the initial label obtained or the IP address of an IP packet encapsulated. Namely, the packet must be stored in the buffer, until the ultimate output information is determined by the retrieval. Also, the label stack addition is adding a label entry to the initial position of the labels attached previously. In this case, the transmission of the packet must be kept waiting for a time period of inserting a new label. Hence, there is a queuing process in the buffer.
In this way, each step is simple, but to implement the above steps with the hardware in the router (packet switch), the steps become more complex. In particular, there is a problem that it takes a lot of processing time to make the pop operation of label stack.